package com.oig.sys.file.api.factory;

import com.oig.sys.file.api.FileUploadService;
import com.oig.sys.file.api.fallback.FileUploadServiceFallBackImpl;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class FileUploadFallBackFactory implements FallbackFactory<FileUploadService> {

    @Override
    public FileUploadService create(Throwable cause) {
        FileUploadServiceFallBackImpl fileUploadServiceFallBack = new FileUploadServiceFallBackImpl();
        fileUploadServiceFallBack.setCause(cause);
        return fileUploadServiceFallBack;
    }
}
